#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'

int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	ll n, k, p, q;
	cin >> n >> k >> p >> q;
	if (1.0 * k / n <= 1.0 * p / q) cout << 0 << endl;
	else cout << (k * q + p - 1) / p - n << endl;
	return 0;
}